using System.Drawing;
using System.Windows.Forms;
using Nuwanda.TfsSpotlight.Shell.Services;

namespace Nuwanda.TfsSpotlight.Shell.Expressions
{
    internal class CommandConfigurationExpression : ICommandConfigurationExpression
    {
        private readonly CommandConfiguration _commandConfiguration;

        public CommandConfigurationExpression(CommandConfiguration commandConfiguration)
        {
            this._commandConfiguration = commandConfiguration;
        }

        public void Commit()
        {
            this._commandConfiguration.Build();
        }

        public ICommandConfigurationExpression Name(string name)
        {
            this._commandConfiguration.Name = name;
            return this;
        }

        public ICommandConfigurationExpression Image(Image image)
        {
            this._commandConfiguration.Image = image;
            return this;
        }

        public ICommandConfigurationExpression Shortcut(Keys shortcut)
        {
            this._commandConfiguration.Shortcut = shortcut;
            return this;
        }

        public ICommandConfigurationExpression AlwaysActive()
        {
            this._commandConfiguration.AlwaysActive = true;
            return this;
        }

        public ICommandConfigurationExpression Asynchronous()
        {
            this._commandConfiguration.Asynchronous = true;
            return this;
        }
    }
}